﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;


namespace Bubble_Game
{
    public class Bola
    {
        static Texture2D textura;
        Vector2 posicao;

        public static List<Bola> lista = new List<Bola>();

        public Bola(ContentManager Content)
        {
            textura = Content.Load<Texture2D>("BolaBubble");
            
            //lista.Add(this);
        }

        public Bola(Vector2 PosicaoInicial)
        {
            this.posicao = PosicaoInicial;
        }

        public Vector2 PosicaoInicial
        {
            get
            {
                return posicao;
            }

            set
            {
                posicao = value;
                lista.Add(this);
            }
        }

        public void Update(GameTime gameTime)
        {
            for (int i = 0; i < lista.Count; i++)
            {
                lista[i].IA();
            }
        }

        void IA()
        {
            //throw new NotImplementedException();
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            for (int i = 0; i < lista.Count; i++)
            {
                spriteBatch.Draw(Bola.textura, lista[i].posicao, Color.White);
            }
            
        }
        
          
        
    }
}
